Reducing Lambda Terms with Traversals
نویسنده
چکیده
We introduce a method to evaluate untyped lambda terms by combining the theory of traversals, a term-tree traversing technique inspired from Game Semantics, with judicious use of the eta-conversion rule of the lambda calculus. The traversal theory of the simply-typed lambda calculus relies on the eta-long transform to ensure that when traversing an application, there is a subterm representing every possible operator's argument. In the untyped setting, we instead exhibit the missing operand via ad-hoc instantiation of the eta-expansion rule, which allows the traversal to proceed as if the operand existed in the original term. This gives rise to a more generic concept of traversals for lambda terms. A notable improvement, in addition to handling untyped terms, is that no preliminary transformation is required: the original unaltered lambda term is traversed. We show that by bounding the non-determinism of the traversal rule for free variables, one can effectively compute a set of traversals characterizing the paths in the tree representation of the beta-normal form, when it exists. This yields an evaluation algorithm for untyped lambda-terms. We prove correctness by showing that traversals implement leftmost linear reduction, a generalization of the head linear reduction of Danos et. al.
منابع مشابه
Reducing Lambda Terms with Traversals (preprint) February 26, 2018
We introduce a method to evaluate untyped lambda terms by combining the theory of traversals,a term-tree traversing techniques inspired from Game Semantics [12, 8], with judicious use of theeta-conversion rule of the lambda calculus.The traversal theory of the simply-typed lambda calculus relies on the eta-long transform toensure that when traversing an application, there is...
متن کاملLanguage Independent Traversals for Program Transformation
A Stratego program defines a transformation on first-order ground terms. Transformation rules define single transformation steps. Transformation rules are combined into transformation strategies by means of combinators that determine where and in what order rules are applied. These combinators include: primitives for traversal to the direct subterms of a node, allowing the definition of many ki...
متن کاملAn improved algorithm to reconstruct a binary tree from its inorder and postorder traversals
It is well-known that, given inorder traversal along with one of the preorder or postorder traversals of a binary tree, the tree can be determined uniquely. Several algorithms have been proposed to reconstruct a binary tree from its inorder and preorder traversals. There is one study to reconstruct a binary tree from its inorder and postorder traversals, and this algorithm takes running time of...
متن کاملBöhm trees, Krivine machine and the Taylor expansion of ordinary lambda-terms
We show that, given an ordinary lambda-term and a normal resource lambda-term which appears in the normal form of its Taylor expansion, the unique resource term of the Taylor expansion of the ordinary lambda-term reducing to this normal resource term can be obtained by running a version of the Krivine abstract machine.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1802.10583 شماره
صفحات -
تاریخ انتشار 2018